<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/c++/5/istream</title>
  <link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">usr/include/c++/5</a> - istream<span style="font-size: 80%;"> (source / <a href="istream.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">1</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:50:33</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntryHi">-</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // Input streams -*- C++ -*-</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : // Copyright (C) 1997-2015 Free Software Foundation, Inc.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       6 </span>            : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       7 </span>            : // terms of the GNU General Public License as published by the
<span class="lineNum">       8 </span>            : // Free Software Foundation; either version 3, or (at your option)
<span class="lineNum">       9 </span>            : // any later version.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      12 </span>            : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      13 </span>            : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      14 </span>            : // GNU General Public License for more details.
<span class="lineNum">      15 </span>            : 
<span class="lineNum">      16 </span>            : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      17 </span>            : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      18 </span>            : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      19 </span>            : 
<span class="lineNum">      20 </span>            : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      21 </span>            : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      22 </span>            : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      23 </span>            : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      24 </span>            : 
<span class="lineNum">      25 </span>            : //
<span class="lineNum">      26 </span>            : // ISO C++ 14882: 27.6.1  Input streams
<span class="lineNum">      27 </span>            : //
<span class="lineNum">      28 </span>            : 
<span class="lineNum">      29 </span>            : /** @file include/istream
<span class="lineNum">      30 </span>            :  *  This is a Standard C++ Library header.
<span class="lineNum">      31 </span>            :  */
<span class="lineNum">      32 </span>            : 
<span class="lineNum">      33 </span>            : #ifndef _GLIBCXX_ISTREAM
<span class="lineNum">      34 </span>            : #define _GLIBCXX_ISTREAM 1
<span class="lineNum">      35 </span>            : 
<span class="lineNum">      36 </span>            : #pragma GCC system_header
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            : #include &lt;ios&gt;
<span class="lineNum">      39 </span>            : #include &lt;ostream&gt;
<span class="lineNum">      40 </span>            : 
<span class="lineNum">      41 </span>            : namespace std _GLIBCXX_VISIBILITY(default)
<span class="lineNum">      42 </span>            : {
<span class="lineNum">      43 </span>            : _GLIBCXX_BEGIN_NAMESPACE_VERSION
<span class="lineNum">      44 </span>            : 
<span class="lineNum">      45 </span>            :   /**
<span class="lineNum">      46 </span>            :    *  @brief  Template class basic_istream.
<span class="lineNum">      47 </span>            :    *  @ingroup io
<span class="lineNum">      48 </span>            :    *
<span class="lineNum">      49 </span>            :    *  @tparam _CharT  Type of character stream.
<span class="lineNum">      50 </span>            :    *  @tparam _Traits  Traits for character type, defaults to
<span class="lineNum">      51 </span>            :    *                   char_traits&lt;_CharT&gt;.
<span class="lineNum">      52 </span>            :    *
<span class="lineNum">      53 </span>            :    *  This is the base class for all input streams.  It provides text
<span class="lineNum">      54 </span>            :    *  formatting of all builtin types, and communicates with any class
<span class="lineNum">      55 </span>            :    *  derived from basic_streambuf to do the actual input.
<span class="lineNum">      56 </span>            :   */
<span class="lineNum">      57 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">      58 </span>            :     class basic_istream : virtual public basic_ios&lt;_CharT, _Traits&gt;
<span class="lineNum">      59 </span>            :     {
<span class="lineNum">      60 </span>            :     public:
<span class="lineNum">      61 </span>            :       // Types (inherited from basic_ios (27.4.4)):
<span class="lineNum">      62 </span>            :       typedef _CharT                                    char_type;
<span class="lineNum">      63 </span>            :       typedef typename _Traits::int_type                int_type;
<span class="lineNum">      64 </span>            :       typedef typename _Traits::pos_type                pos_type;
<span class="lineNum">      65 </span>            :       typedef typename _Traits::off_type                off_type;
<span class="lineNum">      66 </span>            :       typedef _Traits                                   traits_type;
<span class="lineNum">      67 </span>            : 
<span class="lineNum">      68 </span>            :       // Non-standard Types:
<span class="lineNum">      69 </span>            :       typedef basic_streambuf&lt;_CharT, _Traits&gt;            __streambuf_type;
<span class="lineNum">      70 </span>            :       typedef basic_ios&lt;_CharT, _Traits&gt;          __ios_type;
<span class="lineNum">      71 </span>            :       typedef basic_istream&lt;_CharT, _Traits&gt;              __istream_type;
<span class="lineNum">      72 </span>            :       typedef num_get&lt;_CharT, istreambuf_iterator&lt;_CharT, _Traits&gt; &gt;
<span class="lineNum">      73 </span>            :                                                         __num_get_type;
<span class="lineNum">      74 </span>            :       typedef ctype&lt;_CharT&gt;                               __ctype_type;
<span class="lineNum">      75 </span>            : 
<span class="lineNum">      76 </span>            :     protected:
<span class="lineNum">      77 </span>            :       // Data Members:
<span class="lineNum">      78 </span>            :       /**
<span class="lineNum">      79 </span>            :        *  The number of characters extracted in the previous unformatted
<span class="lineNum">      80 </span>            :        *  function; see gcount().
<span class="lineNum">      81 </span>            :       */
<span class="lineNum">      82 </span>            :       streamsize                _M_gcount;
<span class="lineNum">      83 </span>            : 
<span class="lineNum">      84 </span>            :     public:
<span class="lineNum">      85 </span>            :       /**
<span class="lineNum">      86 </span>            :        *  @brief  Base constructor.
<span class="lineNum">      87 </span>            :        *
<span class="lineNum">      88 </span>            :        *  This ctor is almost never called by the user directly, rather from
<span class="lineNum">      89 </span>            :        *  derived classes' initialization lists, which pass a pointer to
<span class="lineNum">      90 </span>            :        *  their own stream buffer.
<span class="lineNum">      91 </span>            :       */
<span class="lineNum">      92 </span>            :       explicit
<span class="lineNum">      93 </span>            :       basic_istream(__streambuf_type* __sb)
<span class="lineNum">      94 </span>            :       : _M_gcount(streamsize(0))
<span class="lineNum">      95 </span>            :       { this-&gt;init(__sb); }
<span class="lineNum">      96 </span>            : 
<span class="lineNum">      97 </span>            :       /**
<span class="lineNum">      98 </span>            :        *  @brief  Base destructor.
<span class="lineNum">      99 </span>            :        *
<span class="lineNum">     100 </span>            :        *  This does very little apart from providing a virtual base dtor.
<span class="lineNum">     101 </span>            :       */
<span class="lineNum">     102 </span>            :       virtual
<span class="lineNum">     103 </span>            :       ~basic_istream()
<span class="lineNum">     104 </span>            :       { _M_gcount = streamsize(0); }
<span class="lineNum">     105 </span>            : 
<span class="lineNum">     106 </span>            :       /// Safe prefix/suffix operations.
<span class="lineNum">     107 </span>            :       class sentry;
<span class="lineNum">     108 </span>            :       friend class sentry;
<span class="lineNum">     109 </span>            : 
<span class="lineNum">     110 </span>            :       //@{
<span class="lineNum">     111 </span>            :       /**
<span class="lineNum">     112 </span>            :        *  @brief  Interface for manipulators.
<span class="lineNum">     113 </span>            :        *
<span class="lineNum">     114 </span>            :        *  Manipulators such as @c std::ws and @c std::dec use these
<span class="lineNum">     115 </span>            :        *  functions in constructs like
<span class="lineNum">     116 </span>            :        *  &lt;code&gt;std::cin &gt;&gt; std::ws&lt;/code&gt;.
<span class="lineNum">     117 </span>            :        *  For more information, see the iomanip header.
<span class="lineNum">     118 </span>            :       */
<span class="lineNum">     119 </span>            :       __istream_type&amp;
<span class="lineNum">     120 </span>            :       operator&gt;&gt;(__istream_type&amp; (*__pf)(__istream_type&amp;))
<span class="lineNum">     121 </span>            :       { return __pf(*this); }
<span class="lineNum">     122 </span>            : 
<span class="lineNum">     123 </span>            :       __istream_type&amp;
<span class="lineNum">     124 </span>            :       operator&gt;&gt;(__ios_type&amp; (*__pf)(__ios_type&amp;))
<span class="lineNum">     125 </span>            :       {
<span class="lineNum">     126 </span>            :         __pf(*this);
<span class="lineNum">     127 </span>            :         return *this;
<span class="lineNum">     128 </span>            :       }
<span class="lineNum">     129 </span>            : 
<span class="lineNum">     130 </span>            :       __istream_type&amp;
<span class="lineNum">     131 </span>            :       operator&gt;&gt;(ios_base&amp; (*__pf)(ios_base&amp;))
<span class="lineNum">     132 </span>            :       {
<span class="lineNum">     133 </span>            :         __pf(*this);
<span class="lineNum">     134 </span>            :         return *this;
<span class="lineNum">     135 </span>            :       }
<span class="lineNum">     136 </span>            :       //@}
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span>            :       //@{
<span class="lineNum">     139 </span>            :       /**
<span class="lineNum">     140 </span>            :        *  @name Extractors
<span class="lineNum">     141 </span>            :        *
<span class="lineNum">     142 </span>            :        *  All the @c operator&gt;&gt; functions (aka &lt;em&gt;formatted input
<span class="lineNum">     143 </span>            :        *  functions&lt;/em&gt;) have some common behavior.  Each starts by
<span class="lineNum">     144 </span>            :        *  constructing a temporary object of type std::basic_istream::sentry
<span class="lineNum">     145 </span>            :        *  with the second argument (noskipws) set to false.  This has several
<span class="lineNum">     146 </span>            :        *  effects, concluding with the setting of a status flag; see the
<span class="lineNum">     147 </span>            :        *  sentry documentation for more.
<span class="lineNum">     148 </span>            :        *
<span class="lineNum">     149 </span>            :        *  If the sentry status is good, the function tries to extract
<span class="lineNum">     150 </span>            :        *  whatever data is appropriate for the type of the argument.
<span class="lineNum">     151 </span>            :        *
<span class="lineNum">     152 </span>            :        *  If an exception is thrown during extraction, ios_base::badbit
<span class="lineNum">     153 </span>            :        *  will be turned on in the stream's error state without causing an
<span class="lineNum">     154 </span>            :        *  ios_base::failure to be thrown.  The original exception will then
<span class="lineNum">     155 </span>            :        *  be rethrown.
<span class="lineNum">     156 </span>            :       */
<span class="lineNum">     157 </span>            : 
<span class="lineNum">     158 </span>            :       //@{
<span class="lineNum">     159 </span>            :       /**
<span class="lineNum">     160 </span>            :        *  @brief  Integer arithmetic extractors
<span class="lineNum">     161 </span>            :        *  @param  __n A variable of builtin integral type.
<span class="lineNum">     162 </span>            :        *  @return  @c *this if successful
<span class="lineNum">     163 </span>            :        *
<span class="lineNum">     164 </span>            :        *  These functions use the stream's current locale (specifically, the
<span class="lineNum">     165 </span>            :        *  @c num_get facet) to parse the input data.
<span class="lineNum">     166 </span>            :       */
<span class="lineNum">     167 </span>            :       __istream_type&amp;
<span class="lineNum">     168 </span>            :       operator&gt;&gt;(bool&amp; __n)
<span class="lineNum">     169 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     170 </span>            : 
<span class="lineNum">     171 </span>            :       __istream_type&amp;
<span class="lineNum">     172 </span>            :       operator&gt;&gt;(short&amp; __n);
<span class="lineNum">     173 </span>            : 
<span class="lineNum">     174 </span>            :       __istream_type&amp;
<span class="lineNum">     175 </span>            :       operator&gt;&gt;(unsigned short&amp; __n)
<span class="lineNum">     176 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     177 </span>            : 
<span class="lineNum">     178 </span>            :       __istream_type&amp;
<span class="lineNum">     179 </span>            :       operator&gt;&gt;(int&amp; __n);
<span class="lineNum">     180 </span>            : 
<span class="lineNum">     181 </span>            :       __istream_type&amp;
<span class="lineNum">     182 </span>            :       operator&gt;&gt;(unsigned int&amp; __n)
<span class="lineNum">     183 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     184 </span>            : 
<span class="lineNum">     185 </span>            :       __istream_type&amp;
<span class="lineNum">     186 </span>            :       operator&gt;&gt;(long&amp; __n)
<span class="lineNum">     187 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     188 </span>            : 
<span class="lineNum">     189 </span>            :       __istream_type&amp;
<span class="lineNum">     190 </span>            :       operator&gt;&gt;(unsigned long&amp; __n)
<span class="lineNum">     191 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     192 </span>            : 
<span class="lineNum">     193 </span>            : #ifdef _GLIBCXX_USE_LONG_LONG
<span class="lineNum">     194 </span>            :       __istream_type&amp;
<span class="lineNum">     195 </span>            :       operator&gt;&gt;(long long&amp; __n)
<span class="lineNum">     196 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     197 </span>            : 
<span class="lineNum">     198 </span>            :       __istream_type&amp;
<span class="lineNum">     199 </span>            :       operator&gt;&gt;(unsigned long long&amp; __n)
<span class="lineNum">     200 </span>            :       { return _M_extract(__n); }
<span class="lineNum">     201 </span>            : #endif
<span class="lineNum">     202 </span>            :       //@}
<span class="lineNum">     203 </span>            : 
<span class="lineNum">     204 </span>            :       //@{
<span class="lineNum">     205 </span>            :       /**
<span class="lineNum">     206 </span>            :        *  @brief  Floating point arithmetic extractors
<span class="lineNum">     207 </span>            :        *  @param  __f A variable of builtin floating point type.
<span class="lineNum">     208 </span>            :        *  @return  @c *this if successful
<span class="lineNum">     209 </span>            :        *
<span class="lineNum">     210 </span>            :        *  These functions use the stream's current locale (specifically, the
<span class="lineNum">     211 </span>            :        *  @c num_get facet) to parse the input data.
<span class="lineNum">     212 </span>            :       */
<span class="lineNum">     213 </span>            :       __istream_type&amp;
<span class="lineNum">     214 </span>            :       operator&gt;&gt;(float&amp; __f)
<span class="lineNum">     215 </span><span class="lineNoCov">          0 :       { return _M_extract(__f); }</span>
<span class="lineNum">     216 </span>            : 
<span class="lineNum">     217 </span>            :       __istream_type&amp;
<span class="lineNum">     218 </span>            :       operator&gt;&gt;(double&amp; __f)
<span class="lineNum">     219 </span>            :       { return _M_extract(__f); }
<span class="lineNum">     220 </span>            : 
<span class="lineNum">     221 </span>            :       __istream_type&amp;
<span class="lineNum">     222 </span>            :       operator&gt;&gt;(long double&amp; __f)
<span class="lineNum">     223 </span>            :       { return _M_extract(__f); }
<span class="lineNum">     224 </span>            :       //@}
<span class="lineNum">     225 </span>            : 
<span class="lineNum">     226 </span>            :       /**
<span class="lineNum">     227 </span>            :        *  @brief  Basic arithmetic extractors
<span class="lineNum">     228 </span>            :        *  @param  __p A variable of pointer type.
<span class="lineNum">     229 </span>            :        *  @return  @c *this if successful
<span class="lineNum">     230 </span>            :        *
<span class="lineNum">     231 </span>            :        *  These functions use the stream's current locale (specifically, the
<span class="lineNum">     232 </span>            :        *  @c num_get facet) to parse the input data.
<span class="lineNum">     233 </span>            :       */
<span class="lineNum">     234 </span>            :       __istream_type&amp;
<span class="lineNum">     235 </span>            :       operator&gt;&gt;(void*&amp; __p)
<span class="lineNum">     236 </span>            :       { return _M_extract(__p); }
<span class="lineNum">     237 </span>            : 
<span class="lineNum">     238 </span>            :       /**
<span class="lineNum">     239 </span>            :        *  @brief  Extracting into another streambuf.
<span class="lineNum">     240 </span>            :        *  @param  __sb  A pointer to a streambuf
<span class="lineNum">     241 </span>            :        *
<span class="lineNum">     242 </span>            :        *  This function behaves like one of the basic arithmetic extractors,
<span class="lineNum">     243 </span>            :        *  in that it also constructs a sentry object and has the same error
<span class="lineNum">     244 </span>            :        *  handling behavior.
<span class="lineNum">     245 </span>            :        *
<span class="lineNum">     246 </span>            :        *  If @p __sb is NULL, the stream will set failbit in its error state.
<span class="lineNum">     247 </span>            :        *
<span class="lineNum">     248 </span>            :        *  Characters are extracted from this stream and inserted into the
<span class="lineNum">     249 </span>            :        *  @p __sb streambuf until one of the following occurs:
<span class="lineNum">     250 </span>            :        *
<span class="lineNum">     251 </span>            :        *  - the input stream reaches end-of-file,
<span class="lineNum">     252 </span>            :        *  - insertion into the output buffer fails (in this case, the
<span class="lineNum">     253 </span>            :        *    character that would have been inserted is not extracted), or
<span class="lineNum">     254 </span>            :        *  - an exception occurs (and in this case is caught)
<span class="lineNum">     255 </span>            :        *
<span class="lineNum">     256 </span>            :        *  If the function inserts no characters, failbit is set.
<span class="lineNum">     257 </span>            :       */
<span class="lineNum">     258 </span>            :       __istream_type&amp;
<span class="lineNum">     259 </span>            :       operator&gt;&gt;(__streambuf_type* __sb);
<span class="lineNum">     260 </span>            :       //@}
<span class="lineNum">     261 </span>            : 
<span class="lineNum">     262 </span>            :       // [27.6.1.3] unformatted input
<span class="lineNum">     263 </span>            :       /**
<span class="lineNum">     264 </span>            :        *  @brief  Character counting
<span class="lineNum">     265 </span>            :        *  @return  The number of characters extracted by the previous
<span class="lineNum">     266 </span>            :        *           unformatted input function dispatched for this stream.
<span class="lineNum">     267 </span>            :       */
<span class="lineNum">     268 </span>            :       streamsize
<span class="lineNum">     269 </span>            :       gcount() const
<span class="lineNum">     270 </span>            :       { return _M_gcount; }
<span class="lineNum">     271 </span>            : 
<span class="lineNum">     272 </span>            :       //@{
<span class="lineNum">     273 </span>            :       /**
<span class="lineNum">     274 </span>            :        *  @name Unformatted Input Functions
<span class="lineNum">     275 </span>            :        *
<span class="lineNum">     276 </span>            :        *  All the unformatted input functions have some common behavior.
<span class="lineNum">     277 </span>            :        *  Each starts by constructing a temporary object of type
<span class="lineNum">     278 </span>            :        *  std::basic_istream::sentry with the second argument (noskipws)
<span class="lineNum">     279 </span>            :        *  set to true.  This has several effects, concluding with the
<span class="lineNum">     280 </span>            :        *  setting of a status flag; see the sentry documentation for more.
<span class="lineNum">     281 </span>            :        *
<span class="lineNum">     282 </span>            :        *  If the sentry status is good, the function tries to extract
<span class="lineNum">     283 </span>            :        *  whatever data is appropriate for the type of the argument.
<span class="lineNum">     284 </span>            :        *
<span class="lineNum">     285 </span>            :        *  The number of characters extracted is stored for later retrieval
<span class="lineNum">     286 </span>            :        *  by gcount().
<span class="lineNum">     287 </span>            :        *
<span class="lineNum">     288 </span>            :        *  If an exception is thrown during extraction, ios_base::badbit
<span class="lineNum">     289 </span>            :        *  will be turned on in the stream's error state without causing an
<span class="lineNum">     290 </span>            :        *  ios_base::failure to be thrown.  The original exception will then
<span class="lineNum">     291 </span>            :        *  be rethrown.
<span class="lineNum">     292 </span>            :       */
<span class="lineNum">     293 </span>            : 
<span class="lineNum">     294 </span>            :       /**
<span class="lineNum">     295 </span>            :        *  @brief  Simple extraction.
<span class="lineNum">     296 </span>            :        *  @return  A character, or eof().
<span class="lineNum">     297 </span>            :        *
<span class="lineNum">     298 </span>            :        *  Tries to extract a character.  If none are available, sets failbit
<span class="lineNum">     299 </span>            :        *  and returns traits::eof().
<span class="lineNum">     300 </span>            :       */
<span class="lineNum">     301 </span>            :       int_type
<span class="lineNum">     302 </span>            :       get();
<span class="lineNum">     303 </span>            : 
<span class="lineNum">     304 </span>            :       /**
<span class="lineNum">     305 </span>            :        *  @brief  Simple extraction.
<span class="lineNum">     306 </span>            :        *  @param  __c  The character in which to store data.
<span class="lineNum">     307 </span>            :        *  @return  *this
<span class="lineNum">     308 </span>            :        *
<span class="lineNum">     309 </span>            :        *  Tries to extract a character and store it in @a __c.  If none are
<span class="lineNum">     310 </span>            :        *  available, sets failbit and returns traits::eof().
<span class="lineNum">     311 </span>            :        *
<span class="lineNum">     312 </span>            :        *  @note  This function is not overloaded on signed char and
<span class="lineNum">     313 </span>            :        *         unsigned char.
<span class="lineNum">     314 </span>            :       */
<span class="lineNum">     315 </span>            :       __istream_type&amp;
<span class="lineNum">     316 </span>            :       get(char_type&amp; __c);
<span class="lineNum">     317 </span>            : 
<span class="lineNum">     318 </span>            :       /**
<span class="lineNum">     319 </span>            :        *  @brief  Simple multiple-character extraction.
<span class="lineNum">     320 </span>            :        *  @param  __s  Pointer to an array.
<span class="lineNum">     321 </span>            :        *  @param  __n  Maximum number of characters to store in @a __s.
<span class="lineNum">     322 </span>            :        *  @param  __delim  A &quot;stop&quot; character.
<span class="lineNum">     323 </span>            :        *  @return  *this
<span class="lineNum">     324 </span>            :        *
<span class="lineNum">     325 </span>            :        *  Characters are extracted and stored into @a __s until one of the
<span class="lineNum">     326 </span>            :        *  following happens:
<span class="lineNum">     327 </span>            :        *
<span class="lineNum">     328 </span>            :        *  - @c __n-1 characters are stored
<span class="lineNum">     329 </span>            :        *  - the input sequence reaches EOF
<span class="lineNum">     330 </span>            :        *  - the next character equals @a __delim, in which case the character
<span class="lineNum">     331 </span>            :        *    is not extracted
<span class="lineNum">     332 </span>            :        *
<span class="lineNum">     333 </span>            :        * If no characters are stored, failbit is set in the stream's error
<span class="lineNum">     334 </span>            :        * state.
<span class="lineNum">     335 </span>            :        *
<span class="lineNum">     336 </span>            :        * In any case, a null character is stored into the next location in
<span class="lineNum">     337 </span>            :        * the array.
<span class="lineNum">     338 </span>            :        *
<span class="lineNum">     339 </span>            :        *  @note  This function is not overloaded on signed char and
<span class="lineNum">     340 </span>            :        *         unsigned char.
<span class="lineNum">     341 </span>            :       */
<span class="lineNum">     342 </span>            :       __istream_type&amp;
<span class="lineNum">     343 </span>            :       get(char_type* __s, streamsize __n, char_type __delim);
<span class="lineNum">     344 </span>            : 
<span class="lineNum">     345 </span>            :       /**
<span class="lineNum">     346 </span>            :        *  @brief  Simple multiple-character extraction.
<span class="lineNum">     347 </span>            :        *  @param  __s  Pointer to an array.
<span class="lineNum">     348 </span>            :        *  @param  __n  Maximum number of characters to store in @a s.
<span class="lineNum">     349 </span>            :        *  @return  *this
<span class="lineNum">     350 </span>            :        *
<span class="lineNum">     351 </span>            :        *  Returns @c get(__s,__n,widen(&amp;apos;\\n&amp;apos;)).
<span class="lineNum">     352 </span>            :       */
<span class="lineNum">     353 </span>            :       __istream_type&amp;
<span class="lineNum">     354 </span>            :       get(char_type* __s, streamsize __n)
<span class="lineNum">     355 </span>            :       { return this-&gt;get(__s, __n, this-&gt;widen('\n')); }
<span class="lineNum">     356 </span>            : 
<span class="lineNum">     357 </span>            :       /**
<span class="lineNum">     358 </span>            :        *  @brief  Extraction into another streambuf.
<span class="lineNum">     359 </span>            :        *  @param  __sb  A streambuf in which to store data.
<span class="lineNum">     360 </span>            :        *  @param  __delim  A &quot;stop&quot; character.
<span class="lineNum">     361 </span>            :        *  @return  *this
<span class="lineNum">     362 </span>            :        *
<span class="lineNum">     363 </span>            :        *  Characters are extracted and inserted into @a __sb until one of the
<span class="lineNum">     364 </span>            :        *  following happens:
<span class="lineNum">     365 </span>            :        *
<span class="lineNum">     366 </span>            :        *  - the input sequence reaches EOF
<span class="lineNum">     367 </span>            :        *  - insertion into the output buffer fails (in this case, the
<span class="lineNum">     368 </span>            :        *    character that would have been inserted is not extracted)
<span class="lineNum">     369 </span>            :        *  - the next character equals @a __delim (in this case, the character
<span class="lineNum">     370 </span>            :        *    is not extracted)
<span class="lineNum">     371 </span>            :        *  - an exception occurs (and in this case is caught)
<span class="lineNum">     372 </span>            :        *
<span class="lineNum">     373 </span>            :        * If no characters are stored, failbit is set in the stream's error
<span class="lineNum">     374 </span>            :        * state.
<span class="lineNum">     375 </span>            :       */
<span class="lineNum">     376 </span>            :       __istream_type&amp;
<span class="lineNum">     377 </span>            :       get(__streambuf_type&amp; __sb, char_type __delim);
<span class="lineNum">     378 </span>            : 
<span class="lineNum">     379 </span>            :       /**
<span class="lineNum">     380 </span>            :        *  @brief  Extraction into another streambuf.
<span class="lineNum">     381 </span>            :        *  @param  __sb  A streambuf in which to store data.
<span class="lineNum">     382 </span>            :        *  @return  *this
<span class="lineNum">     383 </span>            :        *
<span class="lineNum">     384 </span>            :        *  Returns @c get(__sb,widen(&amp;apos;\\n&amp;apos;)).
<span class="lineNum">     385 </span>            :       */
<span class="lineNum">     386 </span>            :       __istream_type&amp;
<span class="lineNum">     387 </span>            :       get(__streambuf_type&amp; __sb)
<span class="lineNum">     388 </span>            :       { return this-&gt;get(__sb, this-&gt;widen('\n')); }
<span class="lineNum">     389 </span>            : 
<span class="lineNum">     390 </span>            :       /**
<span class="lineNum">     391 </span>            :        *  @brief  String extraction.
<span class="lineNum">     392 </span>            :        *  @param  __s  A character array in which to store the data.
<span class="lineNum">     393 </span>            :        *  @param  __n  Maximum number of characters to extract.
<span class="lineNum">     394 </span>            :        *  @param  __delim  A &quot;stop&quot; character.
<span class="lineNum">     395 </span>            :        *  @return  *this
<span class="lineNum">     396 </span>            :        *
<span class="lineNum">     397 </span>            :        *  Extracts and stores characters into @a __s until one of the
<span class="lineNum">     398 </span>            :        *  following happens.  Note that these criteria are required to be
<span class="lineNum">     399 </span>            :        *  tested in the order listed here, to allow an input line to exactly
<span class="lineNum">     400 </span>            :        *  fill the @a __s array without setting failbit.
<span class="lineNum">     401 </span>            :        *
<span class="lineNum">     402 </span>            :        *  -# the input sequence reaches end-of-file, in which case eofbit
<span class="lineNum">     403 </span>            :        *     is set in the stream error state
<span class="lineNum">     404 </span>            :        *  -# the next character equals @c __delim, in which case the character
<span class="lineNum">     405 </span>            :        *     is extracted (and therefore counted in @c gcount()) but not stored
<span class="lineNum">     406 </span>            :        *  -# @c __n-1 characters are stored, in which case failbit is set
<span class="lineNum">     407 </span>            :        *     in the stream error state
<span class="lineNum">     408 </span>            :        *
<span class="lineNum">     409 </span>            :        *  If no characters are extracted, failbit is set.  (An empty line of
<span class="lineNum">     410 </span>            :        *  input should therefore not cause failbit to be set.)
<span class="lineNum">     411 </span>            :        *
<span class="lineNum">     412 </span>            :        *  In any case, a null character is stored in the next location in
<span class="lineNum">     413 </span>            :        *  the array.
<span class="lineNum">     414 </span>            :       */
<span class="lineNum">     415 </span>            :       __istream_type&amp;
<span class="lineNum">     416 </span>            :       getline(char_type* __s, streamsize __n, char_type __delim);
<span class="lineNum">     417 </span>            : 
<span class="lineNum">     418 </span>            :       /**
<span class="lineNum">     419 </span>            :        *  @brief  String extraction.
<span class="lineNum">     420 </span>            :        *  @param  __s  A character array in which to store the data.
<span class="lineNum">     421 </span>            :        *  @param  __n  Maximum number of characters to extract.
<span class="lineNum">     422 </span>            :        *  @return  *this
<span class="lineNum">     423 </span>            :        *
<span class="lineNum">     424 </span>            :        *  Returns @c getline(__s,__n,widen(&amp;apos;\\n&amp;apos;)).
<span class="lineNum">     425 </span>            :       */
<span class="lineNum">     426 </span>            :       __istream_type&amp;
<span class="lineNum">     427 </span>            :       getline(char_type* __s, streamsize __n)
<span class="lineNum">     428 </span>            :       { return this-&gt;getline(__s, __n, this-&gt;widen('\n')); }
<span class="lineNum">     429 </span>            : 
<span class="lineNum">     430 </span>            :       /**
<span class="lineNum">     431 </span>            :        *  @brief  Discarding characters
<span class="lineNum">     432 </span>            :        *  @param  __n  Number of characters to discard.
<span class="lineNum">     433 </span>            :        *  @param  __delim  A &quot;stop&quot; character.
<span class="lineNum">     434 </span>            :        *  @return  *this
<span class="lineNum">     435 </span>            :        *
<span class="lineNum">     436 </span>            :        *  Extracts characters and throws them away until one of the
<span class="lineNum">     437 </span>            :        *  following happens:
<span class="lineNum">     438 </span>            :        *  - if @a __n @c != @c std::numeric_limits&lt;int&gt;::max(), @a __n
<span class="lineNum">     439 </span>            :        *    characters are extracted
<span class="lineNum">     440 </span>            :        *  - the input sequence reaches end-of-file
<span class="lineNum">     441 </span>            :        *  - the next character equals @a __delim (in this case, the character
<span class="lineNum">     442 </span>            :        *    is extracted); note that this condition will never occur if
<span class="lineNum">     443 </span>            :        *    @a __delim equals @c traits::eof().
<span class="lineNum">     444 </span>            :        *
<span class="lineNum">     445 </span>            :        *  NB: Provide three overloads, instead of the single function
<span class="lineNum">     446 </span>            :        *  (with defaults) mandated by the Standard: this leads to a
<span class="lineNum">     447 </span>            :        *  better performing implementation, while still conforming to
<span class="lineNum">     448 </span>            :        *  the Standard.
<span class="lineNum">     449 </span>            :       */
<span class="lineNum">     450 </span>            :       __istream_type&amp;
<span class="lineNum">     451 </span>            :       ignore(streamsize __n, int_type __delim);
<span class="lineNum">     452 </span>            : 
<span class="lineNum">     453 </span>            :       __istream_type&amp;
<span class="lineNum">     454 </span>            :       ignore(streamsize __n);
<span class="lineNum">     455 </span>            : 
<span class="lineNum">     456 </span>            :       __istream_type&amp;
<span class="lineNum">     457 </span>            :       ignore();
<span class="lineNum">     458 </span>            : 
<span class="lineNum">     459 </span>            :       /**
<span class="lineNum">     460 </span>            :        *  @brief  Looking ahead in the stream
<span class="lineNum">     461 </span>            :        *  @return  The next character, or eof().
<span class="lineNum">     462 </span>            :        *
<span class="lineNum">     463 </span>            :        *  If, after constructing the sentry object, @c good() is false,
<span class="lineNum">     464 </span>            :        *  returns @c traits::eof().  Otherwise reads but does not extract
<span class="lineNum">     465 </span>            :        *  the next input character.
<span class="lineNum">     466 </span>            :       */
<span class="lineNum">     467 </span>            :       int_type
<span class="lineNum">     468 </span>            :       peek();
<span class="lineNum">     469 </span>            : 
<span class="lineNum">     470 </span>            :       /**
<span class="lineNum">     471 </span>            :        *  @brief  Extraction without delimiters.
<span class="lineNum">     472 </span>            :        *  @param  __s  A character array.
<span class="lineNum">     473 </span>            :        *  @param  __n  Maximum number of characters to store.
<span class="lineNum">     474 </span>            :        *  @return  *this
<span class="lineNum">     475 </span>            :        *
<span class="lineNum">     476 </span>            :        *  If the stream state is @c good(), extracts characters and stores
<span class="lineNum">     477 </span>            :        *  them into @a __s until one of the following happens:
<span class="lineNum">     478 </span>            :        *  - @a __n characters are stored
<span class="lineNum">     479 </span>            :        *  - the input sequence reaches end-of-file, in which case the error
<span class="lineNum">     480 </span>            :        *    state is set to @c failbit|eofbit.
<span class="lineNum">     481 </span>            :        *
<span class="lineNum">     482 </span>            :        *  @note  This function is not overloaded on signed char and
<span class="lineNum">     483 </span>            :        *         unsigned char.
<span class="lineNum">     484 </span>            :       */
<span class="lineNum">     485 </span>            :       __istream_type&amp;
<span class="lineNum">     486 </span>            :       read(char_type* __s, streamsize __n);
<span class="lineNum">     487 </span>            : 
<span class="lineNum">     488 </span>            :       /**
<span class="lineNum">     489 </span>            :        *  @brief  Extraction until the buffer is exhausted, but no more.
<span class="lineNum">     490 </span>            :        *  @param  __s  A character array.
<span class="lineNum">     491 </span>            :        *  @param  __n  Maximum number of characters to store.
<span class="lineNum">     492 </span>            :        *  @return  The number of characters extracted.
<span class="lineNum">     493 </span>            :        *
<span class="lineNum">     494 </span>            :        *  Extracts characters and stores them into @a __s depending on the
<span class="lineNum">     495 </span>            :        *  number of characters remaining in the streambuf's buffer,
<span class="lineNum">     496 </span>            :        *  @c rdbuf()-&gt;in_avail(), called @c A here:
<span class="lineNum">     497 </span>            :        *  - if @c A @c == @c -1, sets eofbit and extracts no characters
<span class="lineNum">     498 </span>            :        *  - if @c A @c == @c 0, extracts no characters
<span class="lineNum">     499 </span>            :        *  - if @c A @c &gt; @c 0, extracts @c min(A,n)
<span class="lineNum">     500 </span>            :        *
<span class="lineNum">     501 </span>            :        *  The goal is to empty the current buffer, and to not request any
<span class="lineNum">     502 </span>            :        *  more from the external input sequence controlled by the streambuf.
<span class="lineNum">     503 </span>            :       */
<span class="lineNum">     504 </span>            :       streamsize
<span class="lineNum">     505 </span>            :       readsome(char_type* __s, streamsize __n);
<span class="lineNum">     506 </span>            : 
<span class="lineNum">     507 </span>            :       /**
<span class="lineNum">     508 </span>            :        *  @brief  Unextracting a single character.
<span class="lineNum">     509 </span>            :        *  @param  __c  The character to push back into the input stream.
<span class="lineNum">     510 </span>            :        *  @return  *this
<span class="lineNum">     511 </span>            :        *
<span class="lineNum">     512 </span>            :        *  If @c rdbuf() is not null, calls @c rdbuf()-&gt;sputbackc(c).
<span class="lineNum">     513 </span>            :        *
<span class="lineNum">     514 </span>            :        *  If @c rdbuf() is null or if @c sputbackc() fails, sets badbit in
<span class="lineNum">     515 </span>            :        *  the error state.
<span class="lineNum">     516 </span>            :        *
<span class="lineNum">     517 </span>            :        *  @note  This function first clears eofbit.  Since no characters
<span class="lineNum">     518 </span>            :        *         are extracted, the next call to @c gcount() will return 0,
<span class="lineNum">     519 </span>            :        *         as required by DR 60.
<span class="lineNum">     520 </span>            :       */
<span class="lineNum">     521 </span>            :       __istream_type&amp;
<span class="lineNum">     522 </span>            :       putback(char_type __c);
<span class="lineNum">     523 </span>            : 
<span class="lineNum">     524 </span>            :       /**
<span class="lineNum">     525 </span>            :        *  @brief  Unextracting the previous character.
<span class="lineNum">     526 </span>            :        *  @return  *this
<span class="lineNum">     527 </span>            :        *
<span class="lineNum">     528 </span>            :        *  If @c rdbuf() is not null, calls @c rdbuf()-&gt;sungetc(c).
<span class="lineNum">     529 </span>            :        *
<span class="lineNum">     530 </span>            :        *  If @c rdbuf() is null or if @c sungetc() fails, sets badbit in
<span class="lineNum">     531 </span>            :        *  the error state.
<span class="lineNum">     532 </span>            :        *
<span class="lineNum">     533 </span>            :        *  @note  This function first clears eofbit.  Since no characters
<span class="lineNum">     534 </span>            :        *         are extracted, the next call to @c gcount() will return 0,
<span class="lineNum">     535 </span>            :        *         as required by DR 60.
<span class="lineNum">     536 </span>            :       */
<span class="lineNum">     537 </span>            :       __istream_type&amp;
<span class="lineNum">     538 </span>            :       unget();
<span class="lineNum">     539 </span>            : 
<span class="lineNum">     540 </span>            :       /**
<span class="lineNum">     541 </span>            :        *  @brief  Synchronizing the stream buffer.
<span class="lineNum">     542 </span>            :        *  @return  0 on success, -1 on failure
<span class="lineNum">     543 </span>            :        *
<span class="lineNum">     544 </span>            :        *  If @c rdbuf() is a null pointer, returns -1.
<span class="lineNum">     545 </span>            :        *
<span class="lineNum">     546 </span>            :        *  Otherwise, calls @c rdbuf()-&gt;pubsync(), and if that returns -1,
<span class="lineNum">     547 </span>            :        *  sets badbit and returns -1.
<span class="lineNum">     548 </span>            :        *
<span class="lineNum">     549 </span>            :        *  Otherwise, returns 0.
<span class="lineNum">     550 </span>            :        *
<span class="lineNum">     551 </span>            :        *  @note  This function does not count the number of characters
<span class="lineNum">     552 </span>            :        *         extracted, if any, and therefore does not affect the next
<span class="lineNum">     553 </span>            :        *         call to @c gcount().
<span class="lineNum">     554 </span>            :       */
<span class="lineNum">     555 </span>            :       int
<span class="lineNum">     556 </span>            :       sync();
<span class="lineNum">     557 </span>            : 
<span class="lineNum">     558 </span>            :       /**
<span class="lineNum">     559 </span>            :        *  @brief  Getting the current read position.
<span class="lineNum">     560 </span>            :        *  @return  A file position object.
<span class="lineNum">     561 </span>            :        *
<span class="lineNum">     562 </span>            :        *  If @c fail() is not false, returns @c pos_type(-1) to indicate
<span class="lineNum">     563 </span>            :        *  failure.  Otherwise returns @c rdbuf()-&gt;pubseekoff(0,cur,in).
<span class="lineNum">     564 </span>            :        *
<span class="lineNum">     565 </span>            :        *  @note  This function does not count the number of characters
<span class="lineNum">     566 </span>            :        *         extracted, if any, and therefore does not affect the next
<span class="lineNum">     567 </span>            :        *         call to @c gcount().  At variance with putback, unget and
<span class="lineNum">     568 </span>            :        *         seekg, eofbit is not cleared first.
<span class="lineNum">     569 </span>            :       */
<span class="lineNum">     570 </span>            :       pos_type
<span class="lineNum">     571 </span>            :       tellg();
<span class="lineNum">     572 </span>            : 
<span class="lineNum">     573 </span>            :       /**
<span class="lineNum">     574 </span>            :        *  @brief  Changing the current read position.
<span class="lineNum">     575 </span>            :        *  @param  __pos  A file position object.
<span class="lineNum">     576 </span>            :        *  @return  *this
<span class="lineNum">     577 </span>            :        *
<span class="lineNum">     578 </span>            :        *  If @c fail() is not true, calls @c rdbuf()-&gt;pubseekpos(__pos).  If
<span class="lineNum">     579 </span>            :        *  that function fails, sets failbit.
<span class="lineNum">     580 </span>            :        *
<span class="lineNum">     581 </span>            :        *  @note  This function first clears eofbit.  It does not count the
<span class="lineNum">     582 </span>            :        *         number of characters extracted, if any, and therefore does
<span class="lineNum">     583 </span>            :        *         not affect the next call to @c gcount().
<span class="lineNum">     584 </span>            :       */
<span class="lineNum">     585 </span>            :       __istream_type&amp;
<span class="lineNum">     586 </span>            :       seekg(pos_type);
<span class="lineNum">     587 </span>            : 
<span class="lineNum">     588 </span>            :       /**
<span class="lineNum">     589 </span>            :        *  @brief  Changing the current read position.
<span class="lineNum">     590 </span>            :        *  @param  __off  A file offset object.
<span class="lineNum">     591 </span>            :        *  @param  __dir  The direction in which to seek.
<span class="lineNum">     592 </span>            :        *  @return  *this
<span class="lineNum">     593 </span>            :        *
<span class="lineNum">     594 </span>            :        *  If @c fail() is not true, calls @c rdbuf()-&gt;pubseekoff(__off,__dir).
<span class="lineNum">     595 </span>            :        *  If that function fails, sets failbit.
<span class="lineNum">     596 </span>            :        *
<span class="lineNum">     597 </span>            :        *  @note  This function first clears eofbit.  It does not count the
<span class="lineNum">     598 </span>            :        *         number of characters extracted, if any, and therefore does
<span class="lineNum">     599 </span>            :        *         not affect the next call to @c gcount().
<span class="lineNum">     600 </span>            :       */
<span class="lineNum">     601 </span>            :       __istream_type&amp;
<span class="lineNum">     602 </span>            :       seekg(off_type, ios_base::seekdir);
<span class="lineNum">     603 </span>            :       //@}
<span class="lineNum">     604 </span>            : 
<span class="lineNum">     605 </span>            :     protected:
<span class="lineNum">     606 </span>            :       basic_istream()
<span class="lineNum">     607 </span>            :       : _M_gcount(streamsize(0))
<span class="lineNum">     608 </span>            :       { this-&gt;init(0); }
<span class="lineNum">     609 </span>            : 
<span class="lineNum">     610 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     611 </span>            :       basic_istream(const basic_istream&amp;) = delete;
<span class="lineNum">     612 </span>            : 
<span class="lineNum">     613 </span>            :       basic_istream(basic_istream&amp;&amp; __rhs)
<span class="lineNum">     614 </span>            :       : __ios_type(), _M_gcount(__rhs._M_gcount)
<span class="lineNum">     615 </span>            :       {
<span class="lineNum">     616 </span>            :         __ios_type::move(__rhs);
<span class="lineNum">     617 </span>            :         __rhs._M_gcount = 0;
<span class="lineNum">     618 </span>            :       }
<span class="lineNum">     619 </span>            : 
<span class="lineNum">     620 </span>            :       // 27.7.3.3 Assign/swap
<span class="lineNum">     621 </span>            : 
<span class="lineNum">     622 </span>            :       basic_istream&amp; operator=(const basic_istream&amp;) = delete;
<span class="lineNum">     623 </span>            : 
<span class="lineNum">     624 </span>            :       basic_istream&amp;
<span class="lineNum">     625 </span>            :       operator=(basic_istream&amp;&amp; __rhs)
<span class="lineNum">     626 </span>            :       {
<span class="lineNum">     627 </span>            :         swap(__rhs);
<span class="lineNum">     628 </span>            :         return *this;
<span class="lineNum">     629 </span>            :       }
<span class="lineNum">     630 </span>            : 
<span class="lineNum">     631 </span>            :       void
<span class="lineNum">     632 </span>            :       swap(basic_istream&amp; __rhs)
<span class="lineNum">     633 </span>            :       {
<span class="lineNum">     634 </span>            :         __ios_type::swap(__rhs);
<span class="lineNum">     635 </span>            :         std::swap(_M_gcount, __rhs._M_gcount);
<span class="lineNum">     636 </span>            :       }
<span class="lineNum">     637 </span>            : #endif
<span class="lineNum">     638 </span>            : 
<span class="lineNum">     639 </span>            :       template&lt;typename _ValueT&gt;
<span class="lineNum">     640 </span>            :         __istream_type&amp;
<span class="lineNum">     641 </span>            :         _M_extract(_ValueT&amp; __v);
<span class="lineNum">     642 </span>            :     };
<span class="lineNum">     643 </span>            : 
<span class="lineNum">     644 </span>            :   /// Explicit specialization declarations, defined in src/istream.cc.
<span class="lineNum">     645 </span>            :   template&lt;&gt;
<span class="lineNum">     646 </span>            :     basic_istream&lt;char&gt;&amp;
<span class="lineNum">     647 </span>            :     basic_istream&lt;char&gt;::
<span class="lineNum">     648 </span>            :     getline(char_type* __s, streamsize __n, char_type __delim);
<span class="lineNum">     649 </span>            : 
<span class="lineNum">     650 </span>            :   template&lt;&gt;
<span class="lineNum">     651 </span>            :     basic_istream&lt;char&gt;&amp;
<span class="lineNum">     652 </span>            :     basic_istream&lt;char&gt;::
<span class="lineNum">     653 </span>            :     ignore(streamsize __n);
<span class="lineNum">     654 </span>            : 
<span class="lineNum">     655 </span>            :   template&lt;&gt;
<span class="lineNum">     656 </span>            :     basic_istream&lt;char&gt;&amp;
<span class="lineNum">     657 </span>            :     basic_istream&lt;char&gt;::
<span class="lineNum">     658 </span>            :     ignore(streamsize __n, int_type __delim);
<span class="lineNum">     659 </span>            : 
<span class="lineNum">     660 </span>            : #ifdef _GLIBCXX_USE_WCHAR_T
<span class="lineNum">     661 </span>            :   template&lt;&gt;
<span class="lineNum">     662 </span>            :     basic_istream&lt;wchar_t&gt;&amp;
<span class="lineNum">     663 </span>            :     basic_istream&lt;wchar_t&gt;::
<span class="lineNum">     664 </span>            :     getline(char_type* __s, streamsize __n, char_type __delim);
<span class="lineNum">     665 </span>            : 
<span class="lineNum">     666 </span>            :   template&lt;&gt;
<span class="lineNum">     667 </span>            :     basic_istream&lt;wchar_t&gt;&amp;
<span class="lineNum">     668 </span>            :     basic_istream&lt;wchar_t&gt;::
<span class="lineNum">     669 </span>            :     ignore(streamsize __n);
<span class="lineNum">     670 </span>            : 
<span class="lineNum">     671 </span>            :   template&lt;&gt;
<span class="lineNum">     672 </span>            :     basic_istream&lt;wchar_t&gt;&amp;
<span class="lineNum">     673 </span>            :     basic_istream&lt;wchar_t&gt;::
<span class="lineNum">     674 </span>            :     ignore(streamsize __n, int_type __delim);
<span class="lineNum">     675 </span>            : #endif
<span class="lineNum">     676 </span>            : 
<span class="lineNum">     677 </span>            :   /**
<span class="lineNum">     678 </span>            :    *  @brief  Performs setup work for input streams.
<span class="lineNum">     679 </span>            :    *
<span class="lineNum">     680 </span>            :    *  Objects of this class are created before all of the standard
<span class="lineNum">     681 </span>            :    *  extractors are run.  It is responsible for &lt;em&gt;exception-safe
<span class="lineNum">     682 </span>            :    *  prefix and suffix operations,&lt;/em&gt; although only prefix actions
<span class="lineNum">     683 </span>            :    *  are currently required by the standard.
<span class="lineNum">     684 </span>            :   */
<span class="lineNum">     685 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">     686 </span>            :     class basic_istream&lt;_CharT, _Traits&gt;::sentry
<span class="lineNum">     687 </span>            :     {
<span class="lineNum">     688 </span>            :       // Data Members.
<span class="lineNum">     689 </span>            :       bool _M_ok;
<span class="lineNum">     690 </span>            : 
<span class="lineNum">     691 </span>            :     public:
<span class="lineNum">     692 </span>            :       /// Easy access to dependent types.
<span class="lineNum">     693 </span>            :       typedef _Traits                                   traits_type;
<span class="lineNum">     694 </span>            :       typedef basic_streambuf&lt;_CharT, _Traits&gt;            __streambuf_type;
<span class="lineNum">     695 </span>            :       typedef basic_istream&lt;_CharT, _Traits&gt;              __istream_type;
<span class="lineNum">     696 </span>            :       typedef typename __istream_type::__ctype_type     __ctype_type;
<span class="lineNum">     697 </span>            :       typedef typename _Traits::int_type                __int_type;
<span class="lineNum">     698 </span>            : 
<span class="lineNum">     699 </span>            :       /**
<span class="lineNum">     700 </span>            :        *  @brief  The constructor performs all the work.
<span class="lineNum">     701 </span>            :        *  @param  __is  The input stream to guard.
<span class="lineNum">     702 </span>            :        *  @param  __noskipws  Whether to consume whitespace or not.
<span class="lineNum">     703 </span>            :        *
<span class="lineNum">     704 </span>            :        *  If the stream state is good (@a __is.good() is true), then the
<span class="lineNum">     705 </span>            :        *  following actions are performed, otherwise the sentry state
<span class="lineNum">     706 </span>            :        *  is false (&lt;em&gt;not okay&lt;/em&gt;) and failbit is set in the
<span class="lineNum">     707 </span>            :        *  stream state.
<span class="lineNum">     708 </span>            :        *
<span class="lineNum">     709 </span>            :        *  The sentry's preparatory actions are:
<span class="lineNum">     710 </span>            :        *
<span class="lineNum">     711 </span>            :        *  -# if the stream is tied to an output stream, @c is.tie()-&gt;flush()
<span class="lineNum">     712 </span>            :        *     is called to synchronize the output sequence
<span class="lineNum">     713 </span>            :        *  -# if @a __noskipws is false, and @c ios_base::skipws is set in
<span class="lineNum">     714 </span>            :        *     @c is.flags(), the sentry extracts and discards whitespace
<span class="lineNum">     715 </span>            :        *     characters from the stream.  The currently imbued locale is
<span class="lineNum">     716 </span>            :        *     used to determine whether each character is whitespace.
<span class="lineNum">     717 </span>            :        *
<span class="lineNum">     718 </span>            :        *  If the stream state is still good, then the sentry state becomes
<span class="lineNum">     719 </span>            :        *  true (@a okay).
<span class="lineNum">     720 </span>            :       */
<span class="lineNum">     721 </span>            :       explicit
<span class="lineNum">     722 </span>            :       sentry(basic_istream&lt;_CharT, _Traits&gt;&amp; __is, bool __noskipws = false);
<span class="lineNum">     723 </span>            : 
<span class="lineNum">     724 </span>            :       /**
<span class="lineNum">     725 </span>            :        *  @brief  Quick status checking.
<span class="lineNum">     726 </span>            :        *  @return  The sentry state.
<span class="lineNum">     727 </span>            :        *
<span class="lineNum">     728 </span>            :        *  For ease of use, sentries may be converted to booleans.  The
<span class="lineNum">     729 </span>            :        *  return value is that of the sentry state (true == okay).
<span class="lineNum">     730 </span>            :       */
<span class="lineNum">     731 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     732 </span>            :       explicit
<span class="lineNum">     733 </span>            : #endif
<span class="lineNum">     734 </span>            :       operator bool() const
<span class="lineNum">     735 </span>            :       { return _M_ok; }
<span class="lineNum">     736 </span>            :     };
<span class="lineNum">     737 </span>            : 
<span class="lineNum">     738 </span>            :   //@{
<span class="lineNum">     739 </span>            :   /**
<span class="lineNum">     740 </span>            :    *  @brief  Character extractors
<span class="lineNum">     741 </span>            :    *  @param  __in  An input stream.
<span class="lineNum">     742 </span>            :    *  @param  __c  A character reference.
<span class="lineNum">     743 </span>            :    *  @return  in
<span class="lineNum">     744 </span>            :    *
<span class="lineNum">     745 </span>            :    *  Behaves like one of the formatted arithmetic extractors described in
<span class="lineNum">     746 </span>            :    *  std::basic_istream.  After constructing a sentry object with good
<span class="lineNum">     747 </span>            :    *  status, this function extracts a character (if one is available) and
<span class="lineNum">     748 </span>            :    *  stores it in @a __c.  Otherwise, sets failbit in the input stream.
<span class="lineNum">     749 </span>            :   */
<span class="lineNum">     750 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">     751 </span>            :     basic_istream&lt;_CharT, _Traits&gt;&amp;
<span class="lineNum">     752 </span>            :     operator&gt;&gt;(basic_istream&lt;_CharT, _Traits&gt;&amp; __in, _CharT&amp; __c);
<span class="lineNum">     753 </span>            : 
<span class="lineNum">     754 </span>            :   template&lt;class _Traits&gt;
<span class="lineNum">     755 </span>            :     inline basic_istream&lt;char, _Traits&gt;&amp;
<span class="lineNum">     756 </span>            :     operator&gt;&gt;(basic_istream&lt;char, _Traits&gt;&amp; __in, unsigned char&amp; __c)
<span class="lineNum">     757 </span>            :     { return (__in &gt;&gt; reinterpret_cast&lt;char&amp;&gt;(__c)); }
<span class="lineNum">     758 </span>            : 
<span class="lineNum">     759 </span>            :   template&lt;class _Traits&gt;
<span class="lineNum">     760 </span>            :     inline basic_istream&lt;char, _Traits&gt;&amp;
<span class="lineNum">     761 </span>            :     operator&gt;&gt;(basic_istream&lt;char, _Traits&gt;&amp; __in, signed char&amp; __c)
<span class="lineNum">     762 </span>            :     { return (__in &gt;&gt; reinterpret_cast&lt;char&amp;&gt;(__c)); }
<span class="lineNum">     763 </span>            :   //@}
<span class="lineNum">     764 </span>            : 
<span class="lineNum">     765 </span>            :   //@{
<span class="lineNum">     766 </span>            :   /**
<span class="lineNum">     767 </span>            :    *  @brief  Character string extractors
<span class="lineNum">     768 </span>            :    *  @param  __in  An input stream.
<span class="lineNum">     769 </span>            :    *  @param  __s  A pointer to a character array.
<span class="lineNum">     770 </span>            :    *  @return  __in
<span class="lineNum">     771 </span>            :    *
<span class="lineNum">     772 </span>            :    *  Behaves like one of the formatted arithmetic extractors described in
<span class="lineNum">     773 </span>            :    *  std::basic_istream.  After constructing a sentry object with good
<span class="lineNum">     774 </span>            :    *  status, this function extracts up to @c n characters and stores them
<span class="lineNum">     775 </span>            :    *  into the array starting at @a __s.  @c n is defined as:
<span class="lineNum">     776 </span>            :    *
<span class="lineNum">     777 </span>            :    *  - if @c width() is greater than zero, @c n is width() otherwise
<span class="lineNum">     778 </span>            :    *  - @c n is &lt;em&gt;the number of elements of the largest array of *
<span class="lineNum">     779 </span>            :    *  - @c char_type that can store a terminating @c eos.&lt;/em&gt;
<span class="lineNum">     780 </span>            :    *  - [27.6.1.2.3]/6
<span class="lineNum">     781 </span>            :    *
<span class="lineNum">     782 </span>            :    *  Characters are extracted and stored until one of the following happens:
<span class="lineNum">     783 </span>            :    *  - @c n-1 characters are stored
<span class="lineNum">     784 </span>            :    *  - EOF is reached
<span class="lineNum">     785 </span>            :    *  - the next character is whitespace according to the current locale
<span class="lineNum">     786 </span>            :    *  - the next character is a null byte (i.e., @c charT() )
<span class="lineNum">     787 </span>            :    *
<span class="lineNum">     788 </span>            :    *  @c width(0) is then called for the input stream.
<span class="lineNum">     789 </span>            :    *
<span class="lineNum">     790 </span>            :    *  If no characters are extracted, sets failbit.
<span class="lineNum">     791 </span>            :   */
<span class="lineNum">     792 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">     793 </span>            :     basic_istream&lt;_CharT, _Traits&gt;&amp;
<span class="lineNum">     794 </span>            :     operator&gt;&gt;(basic_istream&lt;_CharT, _Traits&gt;&amp; __in, _CharT* __s);
<span class="lineNum">     795 </span>            : 
<span class="lineNum">     796 </span>            :   // Explicit specialization declaration, defined in src/istream.cc.
<span class="lineNum">     797 </span>            :   template&lt;&gt;
<span class="lineNum">     798 </span>            :     basic_istream&lt;char&gt;&amp;
<span class="lineNum">     799 </span>            :     operator&gt;&gt;(basic_istream&lt;char&gt;&amp; __in, char* __s);
<span class="lineNum">     800 </span>            : 
<span class="lineNum">     801 </span>            :   template&lt;class _Traits&gt;
<span class="lineNum">     802 </span>            :     inline basic_istream&lt;char, _Traits&gt;&amp;
<span class="lineNum">     803 </span>            :     operator&gt;&gt;(basic_istream&lt;char, _Traits&gt;&amp; __in, unsigned char* __s)
<span class="lineNum">     804 </span>            :     { return (__in &gt;&gt; reinterpret_cast&lt;char*&gt;(__s)); }
<span class="lineNum">     805 </span>            : 
<span class="lineNum">     806 </span>            :   template&lt;class _Traits&gt;
<span class="lineNum">     807 </span>            :     inline basic_istream&lt;char, _Traits&gt;&amp;
<span class="lineNum">     808 </span>            :     operator&gt;&gt;(basic_istream&lt;char, _Traits&gt;&amp; __in, signed char* __s)
<span class="lineNum">     809 </span>            :     { return (__in &gt;&gt; reinterpret_cast&lt;char*&gt;(__s)); }
<span class="lineNum">     810 </span>            :   //@}
<span class="lineNum">     811 </span>            : 
<span class="lineNum">     812 </span>            :   /**
<span class="lineNum">     813 </span>            :    *  @brief  Template class basic_iostream
<span class="lineNum">     814 </span>            :    *  @ingroup io
<span class="lineNum">     815 </span>            :    *
<span class="lineNum">     816 </span>            :    *  @tparam _CharT  Type of character stream.
<span class="lineNum">     817 </span>            :    *  @tparam _Traits  Traits for character type, defaults to
<span class="lineNum">     818 </span>            :    *                   char_traits&lt;_CharT&gt;.
<span class="lineNum">     819 </span>            :    *
<span class="lineNum">     820 </span>            :    *  This class multiply inherits from the input and output stream classes
<span class="lineNum">     821 </span>            :    *  simply to provide a single interface.
<span class="lineNum">     822 </span>            :   */
<span class="lineNum">     823 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">     824 </span>            :     class basic_iostream
<span class="lineNum">     825 </span>            :     : public basic_istream&lt;_CharT, _Traits&gt;,
<span class="lineNum">     826 </span>            :       public basic_ostream&lt;_CharT, _Traits&gt;
<span class="lineNum">     827 </span>            :     {
<span class="lineNum">     828 </span>            :     public:
<span class="lineNum">     829 </span>            :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">     830 </span>            :       // 271. basic_iostream missing typedefs
<span class="lineNum">     831 </span>            :       // Types (inherited):
<span class="lineNum">     832 </span>            :       typedef _CharT                                    char_type;
<span class="lineNum">     833 </span>            :       typedef typename _Traits::int_type                int_type;
<span class="lineNum">     834 </span>            :       typedef typename _Traits::pos_type                pos_type;
<span class="lineNum">     835 </span>            :       typedef typename _Traits::off_type                off_type;
<span class="lineNum">     836 </span>            :       typedef _Traits                                   traits_type;
<span class="lineNum">     837 </span>            : 
<span class="lineNum">     838 </span>            :       // Non-standard Types:
<span class="lineNum">     839 </span>            :       typedef basic_istream&lt;_CharT, _Traits&gt;              __istream_type;
<span class="lineNum">     840 </span>            :       typedef basic_ostream&lt;_CharT, _Traits&gt;              __ostream_type;
<span class="lineNum">     841 </span>            : 
<span class="lineNum">     842 </span>            :       /**
<span class="lineNum">     843 </span>            :        *  @brief  Constructor does nothing.
<span class="lineNum">     844 </span>            :        *
<span class="lineNum">     845 </span>            :        *  Both of the parent classes are initialized with the same
<span class="lineNum">     846 </span>            :        *  streambuf pointer passed to this constructor.
<span class="lineNum">     847 </span>            :       */
<span class="lineNum">     848 </span>            :       explicit
<span class="lineNum">     849 </span>            :       basic_iostream(basic_streambuf&lt;_CharT, _Traits&gt;* __sb)
<span class="lineNum">     850 </span>            :       : __istream_type(__sb), __ostream_type(__sb) { }
<span class="lineNum">     851 </span>            : 
<span class="lineNum">     852 </span>            :       /**
<span class="lineNum">     853 </span>            :        *  @brief  Destructor does nothing.
<span class="lineNum">     854 </span>            :       */
<span class="lineNum">     855 </span>            :       virtual
<span class="lineNum">     856 </span>            :       ~basic_iostream() { }
<span class="lineNum">     857 </span>            : 
<span class="lineNum">     858 </span>            :     protected:
<span class="lineNum">     859 </span>            :       basic_iostream()
<span class="lineNum">     860 </span>            :       : __istream_type(), __ostream_type() { }
<span class="lineNum">     861 </span>            : 
<span class="lineNum">     862 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     863 </span>            :       basic_iostream(const basic_iostream&amp;) = delete;
<span class="lineNum">     864 </span>            : 
<span class="lineNum">     865 </span>            :       basic_iostream(basic_iostream&amp;&amp; __rhs)
<span class="lineNum">     866 </span>            :       : __istream_type(std::move(__rhs)), __ostream_type(*this)
<span class="lineNum">     867 </span>            :       { }
<span class="lineNum">     868 </span>            : 
<span class="lineNum">     869 </span>            :       // 27.7.3.3 Assign/swap
<span class="lineNum">     870 </span>            : 
<span class="lineNum">     871 </span>            :       basic_iostream&amp; operator=(const basic_iostream&amp;) = delete;
<span class="lineNum">     872 </span>            : 
<span class="lineNum">     873 </span>            :       basic_iostream&amp;
<span class="lineNum">     874 </span>            :       operator=(basic_iostream&amp;&amp; __rhs)
<span class="lineNum">     875 </span>            :       {
<span class="lineNum">     876 </span>            :         swap(__rhs);
<span class="lineNum">     877 </span>            :         return *this;
<span class="lineNum">     878 </span>            :       }
<span class="lineNum">     879 </span>            : 
<span class="lineNum">     880 </span>            :       void
<span class="lineNum">     881 </span>            :       swap(basic_iostream&amp; __rhs)
<span class="lineNum">     882 </span>            :       { __istream_type::swap(__rhs); }
<span class="lineNum">     883 </span>            : #endif
<span class="lineNum">     884 </span>            :     };
<span class="lineNum">     885 </span>            : 
<span class="lineNum">     886 </span>            :   /**
<span class="lineNum">     887 </span>            :    *  @brief  Quick and easy way to eat whitespace
<span class="lineNum">     888 </span>            :    *
<span class="lineNum">     889 </span>            :    *  This manipulator extracts whitespace characters, stopping when the
<span class="lineNum">     890 </span>            :    *  next character is non-whitespace, or when the input sequence is empty.
<span class="lineNum">     891 </span>            :    *  If the sequence is empty, @c eofbit is set in the stream, but not
<span class="lineNum">     892 </span>            :    *  @c failbit.
<span class="lineNum">     893 </span>            :    *
<span class="lineNum">     894 </span>            :    *  The current locale is used to distinguish whitespace characters.
<span class="lineNum">     895 </span>            :    *
<span class="lineNum">     896 </span>            :    *  Example:
<span class="lineNum">     897 </span>            :    *  @code
<span class="lineNum">     898 </span>            :    *     MyClass   mc;
<span class="lineNum">     899 </span>            :    *
<span class="lineNum">     900 </span>            :    *     std::cin &gt;&gt; std::ws &gt;&gt; mc;
<span class="lineNum">     901 </span>            :    *  @endcode
<span class="lineNum">     902 </span>            :    *  will skip leading whitespace before calling operator&gt;&gt; on cin and your
<span class="lineNum">     903 </span>            :    *  object.  Note that the same effect can be achieved by creating a
<span class="lineNum">     904 </span>            :    *  std::basic_istream::sentry inside your definition of operator&gt;&gt;.
<span class="lineNum">     905 </span>            :   */
<span class="lineNum">     906 </span>            :   template&lt;typename _CharT, typename _Traits&gt;
<span class="lineNum">     907 </span>            :     basic_istream&lt;_CharT, _Traits&gt;&amp;
<span class="lineNum">     908 </span>            :     ws(basic_istream&lt;_CharT, _Traits&gt;&amp; __is);
<span class="lineNum">     909 </span>            : 
<span class="lineNum">     910 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     911 </span>            :   // [27.7.1.6] Rvalue stream extraction
<span class="lineNum">     912 </span>            :   /**
<span class="lineNum">     913 </span>            :    *  @brief  Generic extractor for rvalue stream
<span class="lineNum">     914 </span>            :    *  @param  __is  An input stream.
<span class="lineNum">     915 </span>            :    *  @param  __x  A reference to the extraction target.
<span class="lineNum">     916 </span>            :    *  @return  is
<span class="lineNum">     917 </span>            :    *
<span class="lineNum">     918 </span>            :    *  This is just a forwarding function to allow extraction from
<span class="lineNum">     919 </span>            :    *  rvalue streams since they won't bind to the extractor functions
<span class="lineNum">     920 </span>            :    *  that take an lvalue reference.
<span class="lineNum">     921 </span>            :   */
<span class="lineNum">     922 </span>            :   template&lt;typename _CharT, typename _Traits, typename _Tp&gt;
<span class="lineNum">     923 </span>            :     inline basic_istream&lt;_CharT, _Traits&gt;&amp;
<span class="lineNum">     924 </span>            :     operator&gt;&gt;(basic_istream&lt;_CharT, _Traits&gt;&amp;&amp; __is, _Tp&amp; __x)
<span class="lineNum">     925 </span>            :     { 
<span class="lineNum">     926 </span>            :       __is &gt;&gt; __x;
<span class="lineNum">     927 </span>            :       return __is;
<span class="lineNum">     928 </span>            :     }
<span class="lineNum">     929 </span>            : #endif // C++11
<span class="lineNum">     930 </span>            : 
<span class="lineNum">     931 </span>            : _GLIBCXX_END_NAMESPACE_VERSION
<span class="lineNum">     932 </span>            : } // namespace
<span class="lineNum">     933 </span>            : 
<span class="lineNum">     934 </span>            : #include &lt;bits/istream.tcc&gt;
<span class="lineNum">     935 </span>            : 
<span class="lineNum">     936 </span>            : #endif  /* _GLIBCXX_ISTREAM */
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
